package io.renren.modules.eightapp.controller;

import io.renren.common.utils.Result;
import io.renren.modules.eightapp.entity.EiComplainInfoEntity;
import io.renren.modules.eightapp.entity.EiManagerInfoEntity;
import io.renren.modules.eightapp.service.EiComplainService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("eightapp/eicomplain")
@Api(tags="")
public class EiComplainController {
    @Autowired
    private EiComplainService eiComplainService;

    @GetMapping()
    @ApiOperation("查询负责人名单")
    public Result<List<EiManagerInfoEntity>> getComplainList() {
        List<EiManagerInfoEntity> list = eiComplainService.getComplainList();
        return new Result<List<EiManagerInfoEntity>>().ok(list);
    }

    @PutMapping("/{id}")
    @ApiOperation("修改处理状态")
    public Result<Integer> updateStateById(@PathVariable("id") Integer id) {
        int i = eiComplainService.updateStateById(id);
        return new Result<Integer>().ok(i);
    }
}
